package com.tzstcl.sys.quartz.model;

import com.tzstcl.base.model.BaseModel;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 公司：天筑科技股份有限公司
 * 作者：zhugq
 * 日期：2018年09月20日
 * 说明：定时任务实体类
 */
public class Job extends BaseModel<Job> implements Serializable {

    /**
     * 暂停
     */
    public static final String STATUS_PAUSE = "1";

    /**
     * 正常
     */
    public static final String STATUS_RESUME = "0";

    private static final long serialVersionUID = 1L;
    /**
     * 任务ID
     */
    private Integer jobId;
    /**
     * 任务类路径
     */
    @NotNull(message = "类路径不能为空")
    private String jobClassPath;
    /**
     * 任务名称
     */
    @NotNull(message = "任务名称不能为空")
    private String jobName;
    /**
     * 任务组名
     */
    @NotNull(message = "任务组名不能为空")
    private String jobGroup;
    /**
     * 任务方法
     */
    private String methodName;
    /**
     * 方法参数
     */
    private String methodParams;
    /**
     * cron执行表达式
     */
    @NotNull(message = "执行表达式不能为空")
    private String cronExpression;
    /**
     * 计划执行错误策略（0默认 1继续 2等待 3放弃）
     */
    private String misfirePolicy;
    /**
     * 状态（0正常 1暂停）
     */
    private String status;

    public void setJobId(Integer jobId) {
        this.jobId = jobId;
    }

    public Integer getJobId() {
        return this.jobId;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getJobName() {
        return this.jobName;
    }

    public void setJobGroup(String jobGroup) {
        this.jobGroup = jobGroup;
    }

    public String getJobGroup() {
        return this.jobGroup;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public String getMethodName() {
        return this.methodName;
    }

    public void setMethodParams(String methodParams) {
        this.methodParams = methodParams;
    }

    public String getMethodParams() {
        return this.methodParams;
    }

    public void setCronExpression(String cronExpression) {
        this.cronExpression = cronExpression;
    }

    public String getCronExpression() {
        return this.cronExpression;
    }

    public void setMisfirePolicy(String misfirePolicy) {
        this.misfirePolicy = misfirePolicy;
    }

    public String getMisfirePolicy() {
        return this.misfirePolicy;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return this.status;
    }

    public String getJobClassPath() {
        return jobClassPath;
    }

    public void setJobClassPath(String jobClassPath) {
        this.jobClassPath = jobClassPath;
    }
}